package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Param;


public interface SubscribeStatisticMapper {

    Integer statistics(
    		@Param("startTime") String startTime,
    		@Param("endTime") String endTime,
    		@Param("shopId") Integer shopId);

	/**
	 * 查询regionId是否存在
	 * @param shopId
	 * @return
	 */
	Integer queryRegions(@Param("shopId") Integer shopId);


	/**
	 * 订阅总数
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	Integer querySubscribeNum(@Param("startTime") String startTime,
							  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer queryUserTotal(@Param("startTime") String startTime,
						   @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Double queryTotalPrice(@Param("startTime") String startTime,
							@Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer queryTotalPoint(@Param("startTime") String startTime,
							@Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer queryOrderNum(@Param("startTime") String startTime,
						  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer queryGoodsNum(@Param("startTime") String startTime,
						  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer queryGoodsBasePrice(@Param("startTime") String startTime,
						  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer querySubscribeSelfNum(@Param("startTime") String startTime,
							  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer querySubscribeStoreNum(@Param("startTime") String startTime,
							  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer querySubscribeMailNum(@Param("startTime") String startTime,
							  @Param("endTime") String endTime,@Param("shopId") Integer shopId,@Param("subscribeId") Integer subscribeId);

	Integer querySubscribeBasePrice();
}
